import { router } from '@ruifox-cms/utils'
const routes = [
  {
    path: '/comment/user',
    name: 'Layout',
    redirect: '/comment/user/commentFormList',
    component: () => import('@/views/layout/UserLayout.vue'),
    meta: {
      title: '留言',
      whiteList: true
    },
    children: [
      {
        path: '/comment/user/commentFormList',
        name: 'CommentUserCommentFormList',
        component: () => import('@/views/comment/user/CommentFormList.vue'),
        meta: {
          title: '留言表单列表',
          whiteList: true
        }
      },
      {
        path: '/comment/user/commentFormDetail',
        name: 'CommentUserCommentFormDetail',
        component: () => import('@/views/comment/user/CommentFormDetail.vue'),
        meta: {
          title: '留言表单详情',
          whiteList: true
        }
      },
      {
        path: '/comment/user/commentList',
        name: 'CommentUserCommentList',
        component: () => import('@/views/comment/user/CommentList.vue'),
        meta: {
          title: '留言列表',
          whiteList: true
        }
      },
      {
        path: '/comment/user/commentDetail',
        name: 'CommentUserCommentDetail',
        component: () => import('@/views/comment/user/CommentDetail.vue'),
        meta: {
          title: '留言详情',
          whiteList: true
        }
      },
    ]
  }
]

routes.forEach(route => {
  router.addRoute(route)
})

export default router
